package com.example.supplierfinancin;

import com.example.util.ContractTools;
import org.fisco.bcos.asset.client.*;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.awt.*;

@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})
@RestController
public class SupplierfinancinApplication {

	public static void main(String[] args) {
		SpringApplication.run(SupplierfinancinApplication.class, args);
		ContractTools.initialize();
	}

	@GetMapping("/hello")
	public String hello(@RequestParam(value = "name", defaultValue = "World") String name) throws Exception {

		SFClient.mystart();
		return String.format("Hello %s!", name);
	}
}
